<template>
  <div class="card" >
    <el-row type="flex" justify="center">
      <el-col :span="6">
        <div class="login">
          <h1>登录</h1>
          <el-form ref="form" v-model="form" status-icon>
            <!--     手机号       -->
            <el-form-item>
              <el-input v-model="form.phone" prefix-icon="el-icon-user" placeholder="请输入手机号"></el-input>
            </el-form-item>
            <!--   密码       -->
            <el-form-item>
              <el-input type="password" v-model="form.password" prefix-icon="el-icon-lock" placeholder="请输入密码"></el-input>
            </el-form-item>
            <el-form-item>
              <el-row>
                <el-col :span="12">
                  <el-button type="primary" round @click="login">登录</el-button>
                </el-col>
                <el-col :span="12">
                  <router-link to="/register"><el-button round>注册</el-button></router-link>
                </el-col>
              </el-row>
            </el-form-item>
          </el-form>
          <router-link to="/portrait">人脸登录</router-link>
        </div>
      </el-col>
    </el-row>
  </div>


</template>

<script>
export default {
  // eslint-disable-next-line vue/multi-word-component-names
  name: "Login",
  data(){
    return{
      form:{
        //手机号
        phone:'',
        password:''
      }

    }
  },
  methods:{
    login(){
      console.log("登录",this.form)
    }
  }

}
</script>

<style scoped>
body{

}
.el-form-item{
  text-align: center;
}
h1{
  text-align: center;
}
body{
  background: url("../static/img/img.png");
  margin: 0;
}
.card{
  background: url("../static/img/img.png");
  width: 100%;
  height: 100%;position: fixed;
}
.login{
  margin-top: 50%;
  border-radius: 30px;
  background-color: aliceblue;
  padding: 20px;
}
</style>